#include <iostream>
using namespace std;

void Triangle(ostream &out, unsigned int m, unsigned int n)
{
	if (m <= n)
	{
		for (int i = 0; i < m; i++)
		{
			out << '*';
		}
		out << endl;
		if (m < n)
		{
			Triangle(out, m + 1, n);
		}
		for (int i = 0; i < m; i++)
		{
			out << '*';
		}
		out << endl;
	}
}

int main()
{
	Triangle(cout, 1, 10);

	system("pause");
	return 0;
}